using RobotSimulator.Basic;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Propeller : ForceActuator
{
    public float force_val;
}
public class CmdPropellerAddForce : CmdAddForce
{
    public float force_val;
    public override string AddForce(IEU ieu)
    {
        if(ieu is not Propeller)
        {
            return Command.ErrorText;
        }
       
        pos=ieu.transform.position;
        force = ieu.transform.up*force_val;
        ((Propeller)ieu).force_val = force_val;
        return base.AddForce(ieu);
    }
    public CmdPropellerAddForce(float force_val)
    {
        this.force_val = force_val;
        this.pos = Vector3.zero;
        force=Vector3.zero;
        this.execute = AddForce;

    }
    public CmdPropellerAddForce()
    {
        this.force_val = 0;
        this.pos = Vector3.zero;
        force = Vector3.zero;
        this.execute = AddForce;
    }
}
